package com.schedule.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.schedule.dao.ScheduleMapper;
import com.schedule.entity.Schedule;
@Service
public class ScheduleServiceImpl implements ScheduleService {
	@Autowired
	ScheduleMapper scheduleMapper;
	public void AddSchedule(Schedule schedule) {
		scheduleMapper.AddSchedule(schedule);	
	}
	public List<Schedule> SelectSchedule(String user, String start_date) {
		return scheduleMapper.SelectSchedule(user, start_date);
	}
	
	public void DeleteSchedule(Integer id) {
		scheduleMapper.DeleteSchedule(id);
	}
	public Schedule SelectById(Integer id) {
		return scheduleMapper.SelectById(id);
	}
	public void UpdateSchedule(Schedule schedule) {
		scheduleMapper.UpdateSchedule(schedule);
		
	}
	public List<Schedule> SelectScheduleByWarn(String user,String warn, String time) {
		return scheduleMapper.SelectScheduleByWarn(user,warn, time);
	}
	public List<Schedule> SelectAllSchedule(String user) {
		
		return scheduleMapper.SelectAllSchedule(user);
	}
}
